<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateBlogArticleTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     * 文章表
     */
    public function up()
    {
        Schema::create('blog_article', function (Blueprint $table) {
            $table->increments('art_id')->comment('文章表id');
            $table->string('art_title',60)->unique()->comment('文章标题');
            $table->string('art_tag',60)->comment('文章标签');
            $table->string('art_description',255)->comment('文章描述');
            $table->string('art_thumb',255)->comment('文章缩略图');
            $table->text('art_content')->comment('文章内容');
            $table->integer('art_time')->comment('文章发布时间');
            $table->string('art_editor',60)->comment('文章作者');
            $table->integer('art_view')->comment('文章浏览次数');
            $table->integer('cate_id')->comment('文章分类id');
            $table->integer('art_status')->comment('文章是否加入推荐位');
            $table->integer('art_love')->comment('文章点赞数');
            $table->integer('art_collect')->comment('文章收藏量');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('blog_article');
    }
}
